<?php

namespace Admin\Controller;

use Common\Controller\AdminbaseController;

class TitlesysController extends AdminbaseController {
    public function index() {
         
        $ti=file_get_contents('./c/ti.txt');
         
        $this->assign("ti", $ti);
         
        $this->display();
    }
  
    public function edit() {
        $ti=file_get_contents('./c/ti.txt');
        $this->assign("ti", $ti);
        $this->display();
    }
     
    public function editpost() {
        if (isset($_POST['name'])){
             
            file_put_contents('./c/ti.txt', $_POST['name']);
            $info=json_encode(array('status'=>'yes'));
            echo $info;
        }
    }
 
}
